package hrms.util.ws.weather;

import hrms.util.ws.weather.webxml.ArrayOfString;
import hrms.util.ws.weather.webxml.WeatherWS;
import hrms.util.ws.weather.webxml.WeatherWSSoap;
import org.springframework.stereotype.Component;

import java.util.List;

@Component("weatherClient")
public class WeatherClient
{

	public List<String> getWeather(String cCityName)
	{
		WeatherWS tWeatherWS = new WeatherWS();
		WeatherWSSoap tWeatherWSSoap = tWeatherWS.getWeatherWSSoap();
		ArrayOfString weather = null;
		weather = tWeatherWSSoap.getWeather(cCityName, null);
		//for (String s : weather.getString())
		//{
		//	System.out.println(s);
		//	System.out.println("--------------------------------------------------------------------------");
		//}
		return weather.getString();
	}
	
	public static void main(String[] args)
	{
		//WeatherClient tWeatherClient = new WeatherClient();
		//System.out.println(tWeatherClient.getWeather("榆次"));
	}
}
